package com.xiangxiangjd.kj.papersstar.controller.api;

import com.xiangxiangjd.kj.papersstar.aop.PassToken;
import com.xiangxiangjd.kj.papersstar.bean.Answer;
import com.xiangxiangjd.kj.papersstar.controller.BaseController;
import com.xiangxiangjd.kj.papersstar.controller.model.ApiResultModel;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 肖守凯
 * @since 2021-01-21
 */
@RestController
@RequestMapping("/api/answer")
public class AnswerApi extends BaseController{



    @PutMapping(value = "putAnswer")
    @ResponseBody
    @PassToken
    public ApiResultModel putAnswer( Answer answer  ){
             return answerService.addAnswer(answer);
    }






}
